package com.xzz;

import java.util.Arrays;

/**
 * @author 黄会准
 * @since 2020-12-03
 */
public class CanBeEqual {
    public static void main(String[] args) {
        System.out.println(canBeEqual(new int[]{1,2,3,4},new int[]{2,4,1,3}));
        System.out.println(canBeEqual(new int[]{7},new int[]{7}));
        System.out.println(canBeEqual(new int[]{3,7,9},new int[]{3,7,11}));
    }
    public static boolean canBeEqual(int[] target, int[] arr) {
        Arrays.sort(target);
        Arrays.sort(arr);
        return Arrays.equals(target,arr);
    }
}
